package simulation;

import java.awt.Color;
import java.awt.Graphics2D;
import util.Vector;

/**
 * An immovable object.
 * @author Gavin Ovsak
 */
public class FixedMass extends Mass {

    /**
     * Creates FixedMass.
     * @param x x-coordinate
     * @param y y-coordinate
     * @param mass mass of object
     * @param model given display for objects
     */
    public FixedMass(final double x, final double y,
                     final double mass, final Model model) {
        super(x, y, Math.abs(mass), model);
    }

    /**
     * Stop All Acceleration.
     * @param force inputs force that needs to be applied to FixedMass
     */
    @Override
    public void applyForce(final Vector force) {
        //No Acceleration Changes Allowed!
    }

    /**
     * Draws FixedMass on screen.
     * @param pen used to paint shape on the screen
     */
    @Override
    public final void paint(final Graphics2D pen) {
        pen.setColor(Color.BLACK);
        pen.fillRect((int) getLeft(), (int) getTop(),
                     (int) getWidth(), (int) getHeight());
    }
}
